<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="utf-8">
	<title>Controls - Three.js Docs</title>
	<meta name="viewport" content="width=device-width, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0">
	<script src="../scripts/highlight.min.js"></script>
	<link type="text/css" rel="stylesheet" href="../styles/highlight-three.css">
	<link type="text/css" rel="stylesheet" href="../styles/page.css">
</head>
<body>
		<p class="inheritance" translate="no"><a href="EventDispatcher.html">EventDispatcher</a> → </p>
	<h1 translate="no">Controls</h1>
		<section>
			<header>
				<div class="class-description"><p>Abstract base class for controls.</p></div>
			</header>
			<article>
				<div class="container-overview">
					<h2>Constructor</h2>
					<h3 class="name name-method" id="Controls" translate="no">new <a href="#Controls">Controls</a><span class="signature">( object : <span class="param-type"><a href="Object3D.html">Object3D</a></span>, domElement : <span class="param-type">HTMLElement</span> )</span> <span class="type-signature">(abstract) </span></h3>
					<div class="method">
						<div class="description">
							<p>Constructs a new controls instance.</p>
						</div>
						<table class="params">
							<tbody>
								<tr>
									<td class="name">
										<strong>object</strong>
									</td>
									<td class="description last">
										<p>The object that is managed by the controls.</p>
									</td>
								</tr>
								<tr>
									<td class="name">
										<strong>domElement</strong>
									</td>
									<td class="description last">
										<p>The HTML element used for event listeners.</p>
										<p>Default is <code>null</code>.</p>
									</td>
								</tr>
							</tbody>
						</table>
					</div>
				</div>
				<h2 class="subsection-title">Properties</h2>
				<div class="member">
					<h3 class="name" id="domElement" translate="no">.<a href="#domElement">domElement</a><span class="type-signature"> : HTMLElement</span> </h3>
					<div class="description">
						<p>The HTML element used for event listeners.</p>
						<p>Default is <code>null</code>.</p>
					</div>
				</div>
				<div class="member">
					<h3 class="name" id="enabled" translate="no">.<a href="#enabled">enabled</a><span class="type-signature"> : boolean</span> </h3>
					<div class="description">
						<p>Whether the controls responds to user input or not.</p>
						<p>Default is <code>true</code>.</p>
					</div>
				</div>
				<div class="member">
					<h3 class="name" id="keys" translate="no">.<a href="#keys">keys</a><span class="type-signature"> : Object</span> </h3>
					<div class="description">
						<p>This object defines the keyboard input of the controls.</p>
					</div>
				</div>
				<div class="member">
					<h3 class="name" id="mouseButtons" translate="no">.<a href="#mouseButtons">mouseButtons</a><span class="type-signature"> : Object</span> </h3>
					<div class="description">
						<p>This object defines what type of actions are assigned to the available mouse buttons.
It depends on the control implementation what kind of mouse buttons and actions are supported.</p>
					</div>
				</div>
				<div class="member">
					<h3 class="name" id="object" translate="no">.<a href="#object">object</a><span class="type-signature"> : <a href="Object3D.html">Object3D</a></span> </h3>
					<div class="description">
						<p>The object that is managed by the controls.</p>
					</div>
				</div>
				<div class="member">
					<h3 class="name" id="state" translate="no">.<a href="#state">state</a><span class="type-signature"> : number</span> </h3>
					<div class="description">
						<p>The internal state of the controls.</p>
						<p>Default is <code>-1</code>.</p>
					</div>
				</div>
				<div class="member">
					<h3 class="name" id="touches" translate="no">.<a href="#touches">touches</a><span class="type-signature"> : Object</span> </h3>
					<div class="description">
						<p>This object defines what type of actions are assigned to what kind of touch interaction.
It depends on the control implementation what kind of touch interaction and actions are supported.</p>
					</div>
				</div>
				<h2 class="subsection-title">Methods</h2>
					<h3 class="name name-method" id="connect" translate="no">.<a href="#connect">connect</a><span class="signature">( element : <span class="param-type">HTMLElement</span> )</span> </h3>
					<div class="method">
						<div class="description">
							<p>Connects the controls to the DOM. This method has so called &quot;side effects&quot; since
it adds the module's event listeners to the DOM.</p>
						</div>
						<table class="params">
							<tbody>
								<tr>
									<td class="name">
										<strong>element</strong>
									</td>
									<td class="description last">
										<p>The DOM element to connect to.</p>
									</td>
								</tr>
							</tbody>
						</table>
					</div>
					<h3 class="name name-method" id="disconnect" translate="no">.<a href="#disconnect">disconnect</a><span class="signature">()</span> </h3>
					<div class="method">
						<div class="description">
							<p>Disconnects the controls from the DOM.</p>
						</div>
					</div>
					<h3 class="name name-method" id="dispose" translate="no">.<a href="#dispose">dispose</a><span class="signature">()</span> </h3>
					<div class="method">
						<div class="description">
							<p>Call this method if you no longer want use to the controls. It frees all internal
resources and removes all event listeners.</p>
						</div>
					</div>
					<h3 class="name name-method" id="update" translate="no">.<a href="#update">update</a><span class="signature">( delta : <span class="param-type">number</span> )</span> </h3>
					<div class="method">
						<div class="description">
							<p>Controls should implement this method if they have to update their internal state
per simulation step.</p>
						</div>
						<table class="params">
							<tbody>
								<tr>
									<td class="name">
										<strong>delta</strong>
									</td>
									<td class="description last">
										<p>The time delta in seconds.</p>
									</td>
								</tr>
							</tbody>
						</table>
					</div>
				<h2 class="subsection-title">Source</h2>
				<p>
					<a href="https://github.com/mrdoob/three.js/blob/master/src/extras/Controls.js" translate="no" target="_blank" rel="noopener">src/extras/Controls.js</a>
				</p>
			</article>
		</section>
<script src="../scripts/linenumber.js"></script>
<script src="../scripts/page.js"></script>
</body>
</html>